#include <stdio.h>
int main()
{
	int n,a,b,c,m;
	scanf("%d",&n);
	a = n%10;
	b = n%100/10;
	c = n/100;
	m = a*100 + b*10 + c;
	
	printf("%d",m);
	return 0;
}
